/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.webos.java.base.fs.vfs;

import org.json.JSONObject;
import org.webos.java.base.fs.FileDescriptor;
import org.webos.java.base.fs.FileManager;
import org.webos.java.base.fs.FileType;
import org.webos.java.explorer.Explorer;
import org.webos.java.explorer.ftypes.FolderEditor;

/**
 *
 * @author Kostya
 */
public class FolderFileType implements FileType{

    public static FolderFileType DEFAULT_INSTANCE = new FolderFileType();

    public String getCode() {
        return "folder";
    }

    public String getIcon() {
        return "explorer_icn explorer_icn_folder";
    }

    public boolean isSystemType() {
        return false;
    }

    public String getName() {
        return "Folder";
    }

    public String getDescription() {
        return "Folder";
    }

    public boolean isPlainFile() {
        return false;
    }

    public Object getEditor(FileDescriptor file, Explorer explorer) {
        return new FolderEditor(explorer, file);
    }

    public String getViewerClass(FileDescriptor aFile) {
        return "";
    }

    public JSONObject getViewer(FileDescriptor file) {
        return null;
    }

    public JSONObject messageFromViewer(JSONObject aData, FileDescriptor aFile, Explorer explorer) {
        return null;
    }

    static {
        FileManager.setFileType(DEFAULT_INSTANCE);
    }

    public String[] getExtensions() {
        return null;
    }
}
